import 'package:color_dart/color_dart.dart';
import 'package:flutter/material.dart';
import 'package:fluttertz/components/a_row/a_row.dart';
import 'package:fluttertz/utils/Icon.dart';
import 'package:fluttertz/utils/global.dart';

class Addjt extends StatefulWidget {
  static _AddjtState _addjtState;

  getAppBar() => _addjtState.createAppBar();

  Addjt() {
    _addjtState = _AddjtState();
  }

  _AddjtState createState() => _AddjtState();
}

class _AddjtState extends State<Addjt> {
  AppBar createAppBar() {
    return null;
  }

  @override
  Widget build(BuildContext context) {
    return Container(
        decoration: BoxDecoration(
            image: DecorationImage(
              image: AssetImage("lib/assets/images/tz/bg.png"),
              fit: BoxFit.cover,
            )),
        child: Scaffold(
            backgroundColor: Colors.transparent,
            appBar: customAppbar(title: '新增'),
            body: Column(
              children: <Widget>[
                Container(
                    margin: EdgeInsets.only(left:10, right:10, bottom: 10, top: 10),
                    child: ARow(
                      height: 130,
                      color: hex('#ccfdf6e9'),
                      borderRadius: BorderRadius.all(Radius.circular(16.0)),
                      border: Border.all(width: 1, color: rgba(242, 242, 242, 1)),
                      onPressed: () => G.pushNamed('/xzwifi'),
                      leftChild: Container(
                        width: 100,
                        padding: EdgeInsets.all(10.0),
                        child: Image.asset('lib/assets/images/tz/icon_new.png'),
                      ),
                      centerChild: Column(
                          mainAxisAlignment: MainAxisAlignment.center,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            Text(
                              '新增機台',
                              style: TextStyle(color: rgba(56, 56, 56, 1), fontSize: 20.0, fontWeight: FontWeight.bold),
                            ),
                            Text(
                              '新增機台前請將手機連線至場內的WIFI，並確認小幫手裝置已進入配網狀態',
                              style: TextStyle(color: rgba(56, 56, 56, 1), fontSize: 10.0, height: 2.5),
                            ),
                          ]),
                      rightChild: Row(
                        children: <Widget>[
                          icontupian6(color: rgba(228, 228, 228, 1), size: 20)
                        ],
                      ),
                    )),
              ],
            )));
  }

}
